from fastapi import APIRouter

from rosa.common_apps.auth.views.auth import router as auth_router
from rosa.common_apps.index.views.health import router as health_router
from rosa.scarborough_fair import settings

health_routers = APIRouter()
health_routers.include_router(health_router, tags=['index'])
tags_metadata = [{"name": "index", "description": "Common operations. The **check health** logic is here."}]

routers = [{"router": health_routers}]

if settings.AUTH_ENABLE and settings.AUTH_ROUTER_ENABLE:
    auth_routers = APIRouter(prefix="/cas")
    auth_routers.include_router(auth_router, tags=['auth'])

    routers = [{"router": auth_routers}]
    tags_metadata.append({"name": "auth", "description": "认证处理"})
